﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace StatsData.Data.Migrations
{
    public partial class add_t_csi : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "T_CSI",
                columns: table => new
                {
                    ID = table.Column<string>(type: "VARCHAR2(50)", maxLength: 50, nullable: false),
                    DATE = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
                    BATCH = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    TYPE = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    BEGIN_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
                    END_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
                    ITEM_NO = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    SO_NO = table.Column<string>(type: "NVARCHAR2(20)", maxLength: 20, nullable: true),
                    SO_ITEM = table.Column<string>(type: "NVARCHAR2(20)", maxLength: 20, nullable: true),
                    PDT_NO = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    CUST_NO = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    RESULT_NO = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    RESULT = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    ORG_ID = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    CREATE_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
                    MODIFY_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
                    IS_DELETED = table.Column<bool>(type: "NUMBER(1)", nullable: false),
                    ROW_VERSION = table.Column<int>(type: "NUMBER(10)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_T_CSI", x => x.ID);
                });

            migrationBuilder.CreateIndex(
                name: "IX_T_CSI_CREATE_TIME",
                table: "T_CSI",
                column: "CREATE_TIME");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "T_CSI");
        }
    }
}
